<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>服务器访问数据</title>
    <script src="angularjs/angular.min.js"></script>
</head>
<body ng-app="forJsApp">
<div ng-controller="forJsCtrl">
    <ul>
        <li ng-repeat="site in data | orderBy:'id'">
            <h3>{{site.id}}</h3>
            <h4>{{site.site}}</h4>
        </li>
    </ul>
</div>
<script>
    angular.module("forJsApp",[])
            .controller("forJsCtrl",function($scope,$http){
                $http.get("data.json").success(function(result){
                    console.log("success!");
                    $scope.data = result;
                })


            })
</script>
</body>
</html>